3.1.95 \(\int \frac {\sin ^5(c+d x)}{(a+b \sin ^2(c+d x))^2} \, dx\) [95]

Optimal. Leaf size=102 \[ \frac {a (3 a+4 b) \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 b^{5/2} (a+b)^{3/2} d}-\frac {\cos (c+d x)}{b^2 d}-\frac {a^2 \cos (c+d x)}{2 b^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )} \]

[Out]

1/2*a*(3*a+4*b)*arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/b^(5/2)/(a+b)^(3/2)/d-cos(d*x+c)/b^2/d-1/2*a^2*cos(d*x
+c)/b^2/(a+b)/d/(a+b-b*cos(d*x+c)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3265, 398, 393, 214} \begin {gather*} -\frac {a^2 \cos (c+d x)}{2 b^2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}+\frac {a (3 a+4 b) \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 b^{5/2} d (a+b)^{3/2}}-\frac {\cos (c+d x)}{b^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]^5/(a + b*Sin[c + d*x]^2)^2,x]

[Out]

(a*(3*a + 4*b)*ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]])/(2*b^(5/2)*(a + b)^(3/2)*d) - Cos[c + d*x]/(b^2*d)
 - (a^2*Cos[c + d*x])/(2*b^2*(a + b)*d*(a + b - b*Cos[c + d*x]^2))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin ^5(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{\left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {1}{b^2}-\frac {a (a+2 b)-2 a b x^2}{b^2 \left (a+b-b x^2\right )^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x)}{b^2 d}+\frac {\text {Subst}\left (\int \frac {a (a+2 b)-2 a b x^2}{\left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{b^2 d}\\ &=-\frac {\cos (c+d x)}{b^2 d}-\frac {a^2 \cos (c+d x)}{2 b^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}+\frac {(a (3 a+4 b)) \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 b^2 (a+b) d}\\ &=\frac {a (3 a+4 b) \tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 b^{5/2} (a+b)^{3/2} d}-\frac {\cos (c+d x)}{b^2 d}-\frac {a^2 \cos (c+d x)}{2 b^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.62, size = 172, normalized size = 1.69 \begin {gather*} \frac {\frac {a (3 a+4 b) \tan ^{-1}\left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{(-a-b)^{3/2}}+\frac {a (3 a+4 b) \tan ^{-1}\left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{(-a-b)^{3/2}}+2 \sqrt {b} \cos (c+d x) \left (-1-\frac {a^2}{(a+b) (2 a+b-b \cos (2 (c+d x)))}\right )}{2 b^{5/2} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]^5/(a + b*Sin[c + d*x]^2)^2,x]

[Out]

((a*(3*a + 4*b)*ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]])/(-a - b)^(3/2) + (a*(3*a + 4*b)*A
rcTan[(Sqrt[b] + I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]])/(-a - b)^(3/2) + 2*Sqrt[b]*Cos[c + d*x]*(-1 - a^2/
((a + b)*(2*a + b - b*Cos[2*(c + d*x)]))))/(2*b^(5/2)*d)

________________________________________________________________________________________

Maple [A]
time = 0.38, size = 90, normalized size = 0.88

method result size
derivativedivides \(\frac {-\frac {\cos \left (d x +c \right )}{b^{2}}+\frac {a \left (-\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (3 a +4 b \right ) \arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{b^{2}}}{d}\) \(90\)
default \(\frac {-\frac {\cos \left (d x +c \right )}{b^{2}}+\frac {a \left (-\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (3 a +4 b \right ) \arctanh \left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{b^{2}}}{d}\) \(90\)
risch \(-\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 b^{2} d}-\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 d \,b^{2}}+\frac {a^{2} \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}\right )}{b^{2} \left (a +b \right ) d \left (b \,{\mathrm e}^{4 i \left (d x +c \right )}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}+\frac {3 i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{2}}+\frac {i a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{\sqrt {-a b -b^{2}}\, \left (a +b \right ) d b}-\frac {3 i a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{4 \sqrt {-a b -b^{2}}\, \left (a +b \right ) d \,b^{2}}-\frac {i a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{\sqrt {-a b -b^{2}}\, \left (a +b \right ) d b}\) \(377\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)^5/(a+sin(d*x+c)^2*b)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/b^2*cos(d*x+c)+1/b^2*a*(-1/2*a/(a+b)*cos(d*x+c)/(a+b-b*cos(d*x+c)^2)+1/2*(3*a+4*b)/(a+b)/((a+b)*b)^(1/
2)*arctanh(b*cos(d*x+c)/((a+b)*b)^(1/2))))

________________________________________________________________________________________

Maxima [A]
time = 0.57, size = 131, normalized size = 1.28 \begin {gather*} -\frac {\frac {2 \, a^{2} \cos \left (d x + c\right )}{a^{2} b^{2} + 2 \, a b^{3} + b^{4} - {\left (a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{2}} + \frac {{\left (3 \, a + 4 \, b\right )} a \log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{{\left (a b^{2} + b^{3}\right )} \sqrt {{\left (a + b\right )} b}} + \frac {4 \, \cos \left (d x + c\right )}{b^{2}}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

-1/4*(2*a^2*cos(d*x + c)/(a^2*b^2 + 2*a*b^3 + b^4 - (a*b^3 + b^4)*cos(d*x + c)^2) + (3*a + 4*b)*a*log((b*cos(d
*x + c) - sqrt((a + b)*b))/(b*cos(d*x + c) + sqrt((a + b)*b)))/((a*b^2 + b^3)*sqrt((a + b)*b)) + 4*cos(d*x + c
)/b^2)/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (93) = 186\).
time = 0.45, size = 427, normalized size = 4.19 \begin {gather*} \left [-\frac {4 \, {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{3} + 7 \, a^{2} b + 4 \, a b^{2} - {\left (3 \, a^{2} b + 4 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a b + b^{2}} \log \left (\frac {b \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) - 2 \, {\left (3 \, a^{3} b + 7 \, a^{2} b^{2} + 6 \, a b^{3} + 2 \, b^{4}\right )} \cos \left (d x + c\right )}{4 \, {\left ({\left (a^{2} b^{4} + 2 \, a b^{5} + b^{6}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b^{3} + 3 \, a^{2} b^{4} + 3 \, a b^{5} + b^{6}\right )} d\right )}}, -\frac {2 \, {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{3} - {\left (3 \, a^{3} + 7 \, a^{2} b + 4 \, a b^{2} - {\left (3 \, a^{2} b + 4 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) - {\left (3 \, a^{3} b + 7 \, a^{2} b^{2} + 6 \, a b^{3} + 2 \, b^{4}\right )} \cos \left (d x + c\right )}{2 \, {\left ({\left (a^{2} b^{4} + 2 \, a b^{5} + b^{6}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b^{3} + 3 \, a^{2} b^{4} + 3 \, a b^{5} + b^{6}\right )} d\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*(a^2*b^2 + 2*a*b^3 + b^4)*cos(d*x + c)^3 + (3*a^3 + 7*a^2*b + 4*a*b^2 - (3*a^2*b + 4*a*b^2)*cos(d*x +
 c)^2)*sqrt(a*b + b^2)*log((b*cos(d*x + c)^2 + 2*sqrt(a*b + b^2)*cos(d*x + c) + a + b)/(b*cos(d*x + c)^2 - a -
 b)) - 2*(3*a^3*b + 7*a^2*b^2 + 6*a*b^3 + 2*b^4)*cos(d*x + c))/((a^2*b^4 + 2*a*b^5 + b^6)*d*cos(d*x + c)^2 - (
a^3*b^3 + 3*a^2*b^4 + 3*a*b^5 + b^6)*d), -1/2*(2*(a^2*b^2 + 2*a*b^3 + b^4)*cos(d*x + c)^3 - (3*a^3 + 7*a^2*b +
 4*a*b^2 - (3*a^2*b + 4*a*b^2)*cos(d*x + c)^2)*sqrt(-a*b - b^2)*arctan(sqrt(-a*b - b^2)*cos(d*x + c)/(a + b))
- (3*a^3*b + 7*a^2*b^2 + 6*a*b^3 + 2*b^4)*cos(d*x + c))/((a^2*b^4 + 2*a*b^5 + b^6)*d*cos(d*x + c)^2 - (a^3*b^3
 + 3*a^2*b^4 + 3*a*b^5 + b^6)*d)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)**5/(a+b*sin(d*x+c)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 342 vs. \(2 (93) = 186\).
time = 0.44, size = 342, normalized size = 3.35 \begin {gather*} -\frac {\frac {{\left (3 \, a^{2} + 4 \, a b\right )} \arctan \left (\frac {b \cos \left (d x + c\right ) + a + b}{\sqrt {-a b - b^{2}} \cos \left (d x + c\right ) + \sqrt {-a b - b^{2}}}\right )}{{\left (a b^{2} + b^{3}\right )} \sqrt {-a b - b^{2}}} + \frac {2 \, {\left (3 \, a^{2} + 2 \, a b - \frac {6 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {14 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {8 \, b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {4 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{{\left (a b^{2} + b^{3}\right )} {\left (a - \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^5/(a+b*sin(d*x+c)^2)^2,x, algorithm="giac")

[Out]

-1/2*((3*a^2 + 4*a*b)*arctan((b*cos(d*x + c) + a + b)/(sqrt(-a*b - b^2)*cos(d*x + c) + sqrt(-a*b - b^2)))/((a*
b^2 + b^3)*sqrt(-a*b - b^2)) + 2*(3*a^2 + 2*a*b - 6*a^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 14*a*b*(cos(d*
x + c) - 1)/(cos(d*x + c) + 1) - 8*b^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 3*a^2*(cos(d*x + c) - 1)^2/(cos
(d*x + c) + 1)^2 + 4*a*b*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2)/((a*b^2 + b^3)*(a - 3*a*(cos(d*x + c) - 1)
/(cos(d*x + c) + 1) - 4*b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 3*a*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^
2 + 4*b*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 - a*(cos(d*x + c) - 1)^3/(cos(d*x + c) + 1)^3)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.16, size = 95, normalized size = 0.93 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )\,\left (3\,a+4\,b\right )}{2\,b^{5/2}\,d\,{\left (a+b\right )}^{3/2}}-\frac {a^2\,\cos \left (c+d\,x\right )}{2\,d\,\left (a+b\right )\,\left (-b^3\,{\cos \left (c+d\,x\right )}^2+b^3+a\,b^2\right )}-\frac {\cos \left (c+d\,x\right )}{b^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^5/(a + b*sin(c + d*x)^2)^2,x)

[Out]

(a*atanh((b^(1/2)*cos(c + d*x))/(a + b)^(1/2))*(3*a + 4*b))/(2*b^(5/2)*d*(a + b)^(3/2)) - (a^2*cos(c + d*x))/(
2*d*(a + b)*(a*b^2 + b^3 - b^3*cos(c + d*x)^2)) - cos(c + d*x)/(b^2*d)

________________________________________________________________________________________